package cn.iocoder.yudao.module.infra.convert.ocr;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.infra.controller.admin.ocr.vo.record.OcrRecordRespVO;
import cn.iocoder.yudao.module.infra.dal.dataobject.ocr.OcrRecordDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * OCR Record Convert
 *
 * @author SOLO Coding
 */
@Mapper
public interface OcrRecordConvert {

    OcrRecordConvert INSTANCE = Mappers.getMapper(OcrRecordConvert.class);

    PageResult<OcrRecordRespVO> convertPage(PageResult<OcrRecordDO> page);

    List<OcrRecordRespVO> convertList(List<OcrRecordDO> list);

    @Mapping(target = "type", ignore = true)
    @Mapping(target = "result", ignore = true)
    @Mapping(target = "errorMsg", ignore = true)
    @Mapping(target = "processTime", ignore = true)
    OcrRecordRespVO convert(OcrRecordDO bean);

}